package doublePointer;

/*
 *@description
 *@author hkfan
 *@version 1.0
 *@create 2025/5/27 17:06
 */
public class LeetCode_302 {
    public boolean isSubsequence(String s, String t) {
        int i=0,j=0;
        while (i<s.length() && j<t.length()){
            if (s.charAt(i)==t.charAt(j)){
                i++;
                j++;
            }else {
                j++;
            }
        }
        if (i==s.length()){
            return true;
        }
        return false;
    }
}
